package sanliuling;

import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        first();

    }

    public static void first0() {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int xMax = Integer.MIN_VALUE;
        int xMin = Integer.MAX_VALUE;
        int yMax = Integer.MIN_VALUE;
        int yMin = Integer.MAX_VALUE;

        for (int i = 0; i < n; i++) {
            int x = scanner.nextInt();
            if (x < xMin) {
                xMin = x;
            }
            if (x > xMax) {
                xMax = x;
            }
            int y = scanner.nextInt();
            if (y < yMin) {
                yMin = y;
            }
            if (y > yMax) {
                yMax = y;
            }
        }
        if (xMax - xMin > yMax - yMin) {
            System.out.println((long)(xMax - xMin) * (xMax - xMin));
        } else {
            System.out.println((long)(yMax - yMin) * (yMax - yMin));
        }

    }
    public static void first(){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int xMin=Integer.MAX_VALUE;
        int yMin=Integer.MAX_VALUE;
        int xMax=Integer.MIN_VALUE;
        int yMax=Integer.MIN_VALUE;
        for (int i = 0; i < n; i++) {
            int x=sc.nextInt();
            int y=sc.nextInt();
            xMin=Math.min(xMin,x);
            yMin=Math.min(yMin,y);
            xMax=Math.max(xMax,x);
            yMax=Math.max(yMax,y);
        }
        int len=Math.max(xMax-xMin,yMax-yMin);
        System.out.println(len*len);
    }
    public static void second(){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[] views=new int[n+1];
        for (int i = 1; i <= n; i++) {
            views[i]=sc.nextInt();
        }
        int q=sc.nextInt();
        for (int i = 0; i < q; i++) {
            int begin=sc.nextInt();
            int end=sc.nextInt();
            int cap=Math.min(m,end-begin);
            HashSet hashSet=new HashSet(cap);
            for (int j = begin; j <=end ; j++) {
                hashSet.add(views[j]);
                if(hashSet.size()>=m) break;
            }
            System.out.println(hashSet.size());
        }
    }
    public static void third(){
        System.out.println(2);
    }
}
/*
5 3
        1 2 3 2 2
        3
        1 4
        2 4
        1 5
        */